package com.mck.controller;

import com.mck.entity.Result;
import com.mck.service.RedisTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/public/redis")
public class RedisTestController {

    @Autowired
    private RedisTestService redisTestService;

    @GetMapping("/yes/classname")
    public Result getRedisClassname() {
        return Result.success(redisTestService.getRedisClassData());
    }

    @GetMapping("/classname")
    public Result getClassname() {
        return Result.success(redisTestService.getClassData());
    }

    @GetMapping("/scoreStats")
    public Result getScore() {
        return Result.success(redisTestService.getScoreStatsData());
    }

    @GetMapping("/yes/scoreStats")
    public Result getRedisScore() {
        return Result.success(redisTestService.getRedisScoreStatsData());
    }


}
